#include <QPainter>
#include "imageshow.h"

ImageShow::ImageShow(QWidget *parent) : QWidget(parent)
{

}

void ImageShow::setImage(QImage &img)
{
    image = img.copy();
}

void ImageShow::paintEvent(QPaintEvent *)
{
    QPainter painter;
    painter.begin(this);
    painter.drawImage(0,0,image);
    painter.end();
}
